#pragma once

#include "../engine/Singleton.h"
#include <string>
#include <fstream>

namespace Putin{

	/*!
	 * @brief
	 * A global logger class to ouput things to
	 * 
	 * A global logger class
	 * Will output logging texts to 
	 * logg.txt. Acquire the global instance through
	 * the Singleton interface
	 * 
	 * @remarks
	 * Only a constant logging file, logg.txt is used
	 * 
	 */
	class Logger : public Singleton<Logger>
	{
	public:

		Logger();
		virtual ~Logger();

		/*!
		 * \brief
		 * Outputs a text line to the logging file
		 * 
		 * \param line
		 * the text to output
		 * 
		 * \remarks
		 * flushes the output. So, if you write a lot, please
		 * save the string in some temporary buffer before
		 * calling logg to keep speed.
		 * 
		 */
		void loggLine(std::string line);

		/*!
		 * \brief
		 * Outputs a text to the logging file
		 * 
		 * \param text
		 * the text to output
		 * 
		 * \remarks
		 * flushes the output. So, if you write a lot, please
		 * save the string in some temporary buffer before
		 * calling logg to keep speed.
		 * 
		 */
		void logg(std::string text);

	protected:

		std::ofstream* mFout;

	};


}